package cn.fastoo.web.backstage.web.controller;

import cn.fastoo.web.backstage.utils.ShiroUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * IndexController负责首页跳转
 * 
 * @author LP
 */
@Controller
public class IndexController {


	@RequestMapping(value = { "/", "/index" })
	public String index(ModelMap model, HttpServletRequest request, HttpServletResponse response) {
		model.addAttribute("name", ShiroUtils.getName());
		return "/frame/index";
	}


	@RequestMapping("main")
	public String main(Model model) {
		return "/main";
	}
	

}
